<?php
/**
 * Check PHP version
 * @since 2.0.1
 */
if (version_compare(phpversion(), '5.2.0', '<') === true) {
    die('ERROR: Your PHP version is '.phpversion().'. requires PHP 5.2.0 or newer.');
}
//Define the seperater
define('DS', DIRECTORY_SEPARATOR);
define('PS', PATH_SEPARATOR);

//Test the DS
//echo "DS is####".DS."##########";
// Define path to application directory
defined('HOME_PATH')
|| define('HOME_PATH', realpath(dirname(__FILE__) . '/../'));

// Define path to application directory
defined('APP_PATH')
|| define('APP_PATH', realpath(dirname(__FILE__) . '/../application'));

//Configuration Path
defined('APP_CONFIG')
|| define('APP_CONFIG', APP_PATH.DS. 'configs');

//ViewScript Path
defined('APP_VIEW')
|| define('APP_VIEW', APP_PATH.DS. 'views');
//Enviorment Global
defined('APP_ENV')
|| define('APP_ENV', (getenv('APP_ENV') ? getenv('APP_ENV') : 'development'));

//Load Application Class
require_once 'Zend/Application.php';
$configfile = APP_PATH . '/configs/application.ini';
// Create application, bootstrap, and run
$application = new Zend_Application(APP_ENV,$configfile);

//Application Running
$application->bootstrap()->run();